<template>
    <view>
		<view v-show="tabBarId==0">
			<index></index>
		</view>
		<view v-show="tabBarId==1">
			<teamindex></teamindex>
		</view>
		<view v-show="tabBarId==2">
			<member></member>
		</view>
		<view v-show="tabBarId==3">
			<transaction></transaction>
		</view>
		<view v-show="tabBarId==4">
			<myindex></myindex>
		</view>
        <zwTabBar :defaultSel="tabBarId" :list="tabBarList" @clickTab="clickTab" :bigIdx="2"></zwTabBar>
    </view>
</template>
<script>
import zwTabBar from "@/components/zw-tabbar/zw-tabbar.vue";
import index from "../index/index.vue";
import teamindex from "../team/index.vue";
import transaction from "../transaction/index.vue";
import myindex from "../my/index.vue";
import member from "../machine/index.vue";
export default {
    components: {
        zwTabBar,
		index,teamindex,transaction,myindex,member
    },
	 props: ['tabBarId'],
    data() {
        return {
			tabBarId:0,
            tabBarList: [{
				
					"iconPath": "../../static/images/f_01.png", // 没选中前的图标路径
					"selectedIconPath": "../../static/images/f_01a.png" // 选中后的图标路径
				},
				{
				
					"iconPath": "../../static/images/f_02.png", // 没选中前的图标路径
					"selectedIconPath": "../../static/images/f_02a.png" // 选中后的图标路径
				},
				{
					
					"iconPath": "../../static/images/f_05.png", // 没选中前的图标路径
					"selectedIconPath": "../../static/images/f_05a.png" // 选中后的图标路径
				},
				{
					
					"iconPath": "../../static/images/f_03.png",
					"selectedIconPath": "../../static/images/f_03a.png"
				},
				{
					
					"iconPath": "../../static/images/f_04.png",
					"selectedIconPath": "../../static/images/f_04a.png"
				}
            ]
        }
    },
    methods: {
        clickTab(idx) { 
				this.tabBarId=idx	
				console.log(111)
				this.change(idx)
        },
		change(idx){
			console.log(idx)
			this.$emit('handleChange',idx)
		}
    }
}
</script>
<style lang="scss">
</style>
